namespace Microsoft.VisualStudio.EnterpriseTools.OperationDesigner
{
    using System;

    [AttributeUsage(AttributeTargets.Class)]
    public abstract class OperationDesignerBaseAttribute : Attribute, IComparable
    {
        private int order;

        protected OperationDesignerBaseAttribute()
        {
        }

        public int CompareTo(object obj)
        {
            return (this.order - ((OperationDesignerBaseAttribute) obj).order);
        }

        public override bool Equals(object obj)
        {
            if ((obj != null) && (obj is OperationDesignerBaseAttribute))
            {
                return (this.order == ((OperationDesignerBaseAttribute) obj).order);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return this.order.GetHashCode();
        }

        public static bool operator ==(OperationDesignerBaseAttribute attr1, OperationDesignerBaseAttribute attr2)
        {
            return (attr1.order == attr2.order);
        }

        public static bool operator >(OperationDesignerBaseAttribute attr1, OperationDesignerBaseAttribute attr2)
        {
            return (attr1.order > attr2.order);
        }

        public static bool operator >=(OperationDesignerBaseAttribute attr1, OperationDesignerBaseAttribute attr2)
        {
            return (attr1.order >= attr2.order);
        }

        public static bool operator !=(OperationDesignerBaseAttribute attr1, OperationDesignerBaseAttribute attr2)
        {
            return (attr1.order != attr2.order);
        }

        public static bool operator <(OperationDesignerBaseAttribute attr1, OperationDesignerBaseAttribute attr2)
        {
            return (attr1.order < attr2.order);
        }

        public static bool operator <=(OperationDesignerBaseAttribute attr1, OperationDesignerBaseAttribute attr2)
        {
            return (attr1.order <= attr2.order);
        }

        public int Order
        {
            get
            {
                return this.order;
            }
            set
            {
                this.order = value;
            }
        }
    }
}

